package ysm.controller.admin;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import ysm.entity.Seminar;
import ysm.service.SeminarService;

@RestController
@RequestMapping("/public")
public class SeminarController {

	@Autowired
	private SeminarService seminarsService;
	
	@RequestMapping("/loadAllSeminars")
	public List loadAllSeminars() {
		return seminarsService.loadAllSeminar();
	}
	
	@RequestMapping("/selectSeminarsByPrimaryKey")
	public Seminar selectByPrimaryKey(Integer id) {
		return seminarsService.selectByPrimaryKey(id);
	}
	
	@RequestMapping("/insertSeminars")
	public void insert(Seminar record) {
		seminarsService.insert(record);
	}
	
	@RequestMapping("/updateSeminarsByPrimaryKey")
	public void updateByPrimaryKey(Seminar record) {
		seminarsService.updateByPrimaryKey(record);
	}
	

}
